﻿using System;
using System.Collections.Generic;
using System.Linq;

#if WINDOWS_PHONE71
using Microsoft.Phone.Shell;

namespace WindowsPhoneEssentials.Abstractions
{
    public class ShellTileWrapper : IShellTile
    {
        public IEnumerable<ShellTile> ActiveTiles
        {
            get { return ShellTile.ActiveTiles; }
        }

        public ShellTile ApplicationTile
        {
            get
            {
                // Application Tile is always the first Tile, even if it is not pinned to Start.
                // see http://msdn.microsoft.com/en-us/library/hh202979(v=VS.92).aspx
                return ShellTile.ActiveTiles.First();
            }
        }

        public void Create(Uri navigationUri, ShellTileData initialData)
        {
            ShellTile.Create(navigationUri, initialData);
        }

        public string ConvertToXMLFormat(string str)
        {
            return ShellTile.ConvertToXMLFormat(str);
        }
    }
}

#endif
